<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>推广码管理</title>
    <?php require 'templates/common/head.html'; ?>
    <style type="text/css">
        .divleft{width: 10%; float: left; text-align:left; border-right: solid 1px #d5d5d5; margin-right: 2% }
        .divright{ width: 30%; float:right; text-align: right;}
    </style>
</head>
<body>


<div class="container-fluid">
    <?php require 'templates/common/nav.html'; ?>
    <div class="panel panel-primary">
        <div class="panel-heading text-center"><h3 class="panel-title">推广码管理</h3></div>
        <div class="panel-body">
            <div >
                <form action="" method="get">
                    <input type="hidden" name="m" value="user_promotion_code" />
                    用户名:<input type="text" name="name" value="<?=$userName?>">
                    <input type="submit" value="搜索">
                </form>
            </div>
        </div>

        <div class="panel-body">
            <div class="panel-group"   id="accordion" role="tablist" aria-multiselectable="true">

                <div class="panel panel-default" >
                    <div class="panel-heading" style="background-color:#d5d5d5" >
                        <div class="row">
                            <div class="col-xs-4 text-justify" style="width:100%;">
                                <div class="divleft"><b  >用户名</b></div>
                                <div class="divleft" > <b >联系方式</b></div>
                                <div class="divleft" > <b >推广数量</b></div>
                                <div class="divleft" > <b >认证人数</b></div>
                                <div class="divright" > <b >操作</b></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="panel panel-default">
                    <?php foreach($infos as $key => $value):?>
                        <div class="panel-heading"  style=" <?php if($key%2==0){echo "background-color:#DFF0D8;";}else{ echo "border-top: solid 2px #ffffff;";}?>">
                            <div class="row">
                                <div class="col-xs-4 text-justify" style="width:100%;">
                                    <div class="divleft"><span>&nbsp;<?=$value['name'] ?></span></div>
                                    <div class="divleft">&nbsp;<?= $value['telephone'] ?></div>
                                    <div class="divleft">&nbsp;<?= $value['数量'] ?></div>
                                    <div class="divleft">&nbsp;<?= $value['authentication'] ?></div>
                                    <div class="divright">
                                        <a class="btn btn-primary btn-xs" href="index.php?m=user_promotion_code&a=show_user_detail&code=<?php echo $value['二维码编号']?>" >查看推广用户详情</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php endforeach; ?>
                </div>

            </div>
        </div>

    <div><?= $page->showpage();?></div>
    </div>

</div>
<?php require 'templates/common/foot.html'; ?>
</body>
</html>